<%@ page import="com.ethereal.petmanagement.entity.Pet" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<link rel="stylesheet" type="text/css" href="../style/header.css"/>
<%@ include file="../common/header.jsp" %>
<h2>🐾 欢迎来到宠物商城</h2>

<div style="clear:both;">
    <%
        List<Pet> products = new ArrayList<>();
        for(Pet p : products) {
    %>
    <div class="product">
        <img src="<%= p.getAvatarUrl() %>" alt="<%= p.getName() %>">
        <p><strong><%= p.getName() %></strong></p>
        <p><%= p.getBirthday() %></p>
    </div>
    <% } %>
</div>

<div style="clear:both;">
    <hr>
    <a href="addProduct.jsp">添加新商品</a>
</div>
</body>
<style>
    .product {
        width: 200px;
        float: left;
        margin: 20px;
        text-align: center;
    }
    .product img {
        width: 180px;
        height: 180px;
        object-fit: cover;
    }
</style>
</html>
